﻿namespace SanguoSharp.Server
{
    /// <summary>
    /// 一般的牌 比如桃 用了就用了
    /// </summary>
    public abstract class GeneralCard : PlayableCard
    {
        protected GeneralCard(Game game, int id, CardType type, CardSuit suit, CardRank rank)
            : base(game, id, type, suit, rank)
        {
        }

        protected override void OnPlay()
        {
            Player owner = Owner;
            Game.GameTable.PlayerPlayCard(this);
            OnPlay(owner);
        }
        protected override void OnPlayVirtually(Card card)
        {
            Player owner = card.Owner;
            Game.GameTable.PlayerPlayCard(card, this.Type);
            OnPlay(owner);
        }

        protected abstract void OnPlay(Player owner);
    }
}
